From: Roan Kattouw Date: Mon, 8 Oct 2007 18:00:17 +0000 (+0000) Subject: (bug 11569) API Login should return the cookie prefix X-Git-Tag: 1.31.0-rc.0~51194 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=647f47062550a3d8320b09f3ccf9cd59bfedd72a;p=lhc%2Fweb%2Fwiklou.git (bug 11569) API Login should return the cookie prefix --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 87b6d83116..96ec3e87e3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -110,6 +110,7 @@ Full API documentation is available at http://www.mediawiki.org/wiki/API * Include svn revision number (if install is checked-out from svn) in siteinfo query. * (bug 11173) Allow limited wikicode rendering via api.php * (bug 11572) API should provide interface for expanding templates +* (bug 11569) Login should return the cookie prefix === Languages updated in 1.12 === diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php index d62fbfb49b..851b531441 100644 --- a/includes/api/ApiLogin.php +++ b/includes/api/ApiLogin.php @@ -94,7 +94,7 @@ class ApiLogin extends ApiBase { $loginForm = new LoginForm($params); switch ($loginForm->authenticateUserData()) { case LoginForm :: SUCCESS : - global $wgUser; + global $wgUser, $wgCookiePrefix; $wgUser->setOption('rememberpassword', 1); $wgUser->setCookies(); @@ -103,6 +103,8 @@ class ApiLogin extends ApiBase { $result['lguserid'] = $_SESSION['wsUserID']; $result['lgusername'] = $_SESSION['wsUserName']; $result['lgtoken'] = $_SESSION['wsToken']; + $result['cookieprefix'] = $wgCookiePrefix; + $result['sessionid'] = $_COOKIE["{$wgCookiePrefix}_session"]; break; case LoginForm :: NO_NAME :